package com.xlf.common.model;

import java.util.List;

import com.jfinal.plugin.activerecord.Model;

@SuppressWarnings("serial")
public class OrderCatalog extends Model<OrderCatalog> {
	
	public static final OrderCatalog dao = new OrderCatalog();
	
	/**
	 * 关联查询OrderItem
	 * @return
	 */
	public List<OrderItem> getOrderItems() {
		return OrderItem.dao.find("select * from orderitem where oc_id=?", getInt("oc_id"));
	}
	public OrderCatalog exeFindById(String o_id, int c_id) {
		return findFirst("select * from ordercatalog where o_id=? and c_id=?", o_id, c_id);
	}
}
